package br.edu.unipampa.view;

import org.andengine.engine.camera.Camera;
import org.andengine.entity.sprite.Sprite;
import org.andengine.opengl.util.GLState;

import br.edu.unipampa.util.BaseScene;
import br.edu.unipampa.util.SceneManager.SceneType;

public class SplashScreen extends BaseScene{
	private Sprite splash;
	
	@Override
	public void createScene() {
		splash = new Sprite(200, 0, resourcesManager.textSplashScreen, vbom)
		{
		    @Override
		    protected void preDraw(GLState pGLState, Camera pCamera) 
		    {
		       super.preDraw(pGLState, pCamera);
		       pGLState.enableDither();
		    }
		};
		attachChild(splash);
	}

	@Override
	public void onBackKeyPressed() {
	}

	@Override
	public SceneType getSceneType() {
		return SceneType.SCENE_SPLASH;
	}

	@Override
	public void disposeScene() {
		 splash.detachSelf();
		    splash.dispose();
		    this.detachSelf();
		    this.dispose();
	}

}
